$!      IDENT X-23N6
$!
$!++
$! Facility:    SATELLITE_CONFIG, Local Area VAXcluster Satellite Configuration
$!                                Procedure
$!
$! Module:      SATELLITE_CONFIG
$!
$! Abstract:    This procedure enables a satellite node to enter or leave a
$!              Local Area cluster. It has three commands: ADD, REMOVE,
$!              MODIFY.
$!
$!              The ADD command establishes a root directory on the boot node,
$!              updates the network database for remote booting, creates 
$!              specific parameter files for the satellite node, and creates
$!              the satellite paging and swapping files.
$!
$!              The REMOVE command deletes the root directory on the boot node
$!              and updates the network database to disable remote booting.
$!
$!              The MODIFY command modifies the information in the boot node's
$!              network database, pertaining to the satellite node.
$!
$       say "           Satellite Configuration Procedure"

    This procedure configures a satellite node in the cluster.
    It can ADD or REMOVE a satellite node, and it can MODIFY 
    the network database.

    To ensure that you have the required privileges, invoke this
    procedure from the system manager's account.

    If the local disk on the satellite node is to be INITIALIZED for 
    paging and swapping, please be sure you are satisfied with the
    BACKUP of the local disk before proceeding.

$       ask P1 "ADD, REMOVE or MODIFY a satellite node [ADD]? "
$       ask a "May this procedure temporarily interrupt DECnet traffic [YES]? "
$       say "Please stop circuit before running this procedure."
$       say "This system does not have an Ethernet device."
$ !
$ ! Prompt for the disk name.
$ ! 
$       ask disk "What is the device name for the new system root [''sd']? "
$ !
$ ! Get the default system root name.
$ !
$       say "There are no more free roots on ''sd'."
$       say "Invalid diskname or disk not mounted."
$ !
$ ! Get a valid system root name.
$ !
$       ask root "What is the name of the new system root [''dfltroot']? "
$       ask scssystemid "What is the DECnet node address of the satellite node? "
$       ask boot_flg "Allow conversational bootstraps on the satellite node [NO]? "
$ !
$ ! Create new directory tree.
$ !
$       say "Creating directory tree ''ROOT'..."
$       say "System root ''ROOT' created."
$ !
$ ! Create MODPARAMS.DAT.
$ !
$ ! 
$ ! Create VAXVMSSYS.PAR
$ !
$! If the seed file VAXVMSSYS.EVC does not exist, use the default
$! settings, which while bad, are not as bad as using CURRENT which
$! would be the boot node's setting. (Things like ALLOCLASS would not
$! be set correctly and mounted disks appear unmounted.) The true fix
$! needs to be done by AUTOGEN.
$       say "This system disk is not set up as a cluster system disk."
$       say "This node is not booted with VAXcluster NE 0"
$ !
$ ! Get and verify hardware address.
$ !
$       ask num "What is the hardware address of the satellite node? "
$ !
$ ! Set up the DECnet database for this node.
$ !
$       say "Updating network database..."

$ ! Here if an error occurs before the network database has been updated.
$ ! This will delete the root directory and exit.
$ !
$       say "The satellite node has been REMOVED."
$ !
$ ! Prompt the user for the size of the page/swap file. If the user wants
$ ! local paging then create a temporary page file so that the satellite
$ ! can initially boot. Otherwise, create the requested page and swap file
$ ! on the boot node.
$ !     
$       ask pfsize "Size of pagefile for the new satellite [''default_pfsize' blocks]? "
$       say "Pagefile must be at least ''min_pfsize'."

$       ask swapsize "Size of swap file for the new satellite [''default_swapsize' blocks]? "
$       say "Swapfile must be at least ''min_swpsize'."

$       ask local "May the local satellite disk be used for paging and swapping? "
$ !
$ ! Create the initial page and startup file.
$ !  
$       say "Creating temporary page file in order to boot ''scsnode' the first time..."

$ ! Write STARTUP1.COM. This file is the initial startup file for the satellite
$ ! node. When the satellite node comes up, the local disks will be served.
$ ! Satellite_config will be running on the boot node and see the served disks.
$ ! It will ask the user which disk it can use for paging and swapping and then
$ ! create the requested files. It will then create INSTALL_PAGE.COM which will
$ ! install the local page/swap files. 
$ !
$ ! STARTUP1.COM waits 'til INSTALL_PAGE.COM has been created before proceeding.
$ ! It then proceeds to configure the network database, invoke autogen and 
$ ! reboot the satellite.
$ !
$ !
$ ! Define cluster logicals
$ !
$! For two boot disk configurations, define cluster common file
$! SYSUAF in the satellite's startup com file. Must 
$! do after mountshr installation.

$ ! If we're running the IVP then we must not let AUTOGEN do the REBOOT
$ ! since AUTOGEN will automatically reset the startup file to SYS$SYSTEM:
$ ! STARTUP.COM. (bug in AUTOGEN).

$ !
$ ! Instruct the user to boot the satellite node.
$ !
$       say "''scsnode' is already a member of the cluster."
$       say "Please reboot ''scsnode' now."
$       say "Waiting for satellite node to leave the cluster..."

    This procedure will now wait until the satellite node is a 
    member of this cluster.

    Once the satellite node joins the cluster, this procedure
    will ask you which local disk it can use for paging and
    swapping.
        
    Please boot the satellite node now.

$ !
$ ! Wait until the satellite becomes a cluster member. Once it is part
$ ! of the cluster, wait a reasonable amount of time to see the disks.
$ !
$       say "Waiting for satellite node to boot..."
$       say "The local disks on ",scsnode," are:"
$       ask dsknam "Which disk can be used for paging and swapping? ''nodedollar'"
$ !
$ ! Special check for VAXstar disk. The device type is seen as an RX02 (11)
$ ! and the device name is always "DUxx". Therefore, make sure we do not 
$ ! see this as a floppy.
$ !
$       say "Invalid disk."
$       say "This procedure will not use a floppy disk for paging and swapping."

$       ask inidsk "May this procedure INITIALIZE ''dsknam' [YES]? "
$       say "This procedure will initialize the disk, ''dsknam'."
$       ask dskbak "Are you satisfied with the BACKUP of ''dsknam' [NO]? "
$       say "Initializing ''dsknam'..."

$       say "The satellite configuration procedure has successfully completed."


$       say "There are no local disks on node ''scsnode'."
$       say "Creating page and swap files on the boot node."
$       say "The satellite configuration procedure has successfully completed."

    This node has been configured to allow the satellite node to 
    join this cluster.

    The first time the satellite node boots, "NETCONFIG" and
    "AUTOGEN" will run automatically.


$ !
$ ! Remove a satellite node.
$ !
$ !
$ ! Tell the user what REMOVE does.
$ !

    The REMOVE command disables a satellite node by:

            o deleting its root directory tree.

            o removing its remote booting information
              from the network database.

$ !
$ ! Prompt for the disk name.
$ ! 
$       ask disk "What is the device name for the system root [''sd']? "

$ ! Get a valid system root name.
$ !
$       ask root "What is the name of the system root? "
$ !
$ ! Get a valid node name.
$ !
$ !
$ ! Make sure the node name is associated with the specified root.
$ !
$       say "Verifying network database..."
$ !
$ ! Fix up network database.
$ !
$       say "Updating network database..."

$       say "The satellite configuration procedure has successfully completed."

$       say "Invalid disk."
$       say "Node ''SCSNODE' is a member of the cluster. Please bring down ''SCSNODE'"
$       say "before running this procedure."
$       say "Node ''SCSNODE' does not exist in the permanent network database."
$       say "Root ''ROOT' is not associated with node ''SCSNODE'."
$       ask proceed "Do you still want to delete the entire directory ''ROOT' [NO]? "
$ !
$ ! Modify the network database.
$ !
$       ask num "What is the new hardware address [''hdwaddr']? "
$ !
$ ! Modify the network database.
$ !
$       say "Updating network database..."

$ ! If the SCSSYSTEMID was changed then make sure VAXVMSSYS.PAR and
$ ! MODPARAMS.DAT in the satellite's root directory get updated.
$ !
$       say "The satellite configuration procedure has successfully completed."

$       say "Invalid disk."
$       say "Node ''SCSNODE' does not exist in the permanent network database."
$       say "The permanent network database for ''SCSNODE' is not set up for remote booting."
$
